#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<queue>
using namespace std;
using pii = pair<int, int>;
const int N = 110;
int a[N], b[N], c[N];
int n, t;
int ans;
int work(int k, int time)
{
    priority_queue<pii> q;
    int res = 0;
    for (int i = 1; i <= k; i++) q.push({ a[i],i });
    for (int i = 1; i <= time; i++)
    {
        pii s = q.top();
        q.pop();
        res += s.first;
        q.push({ max(0,s.first - b[s.second]),s.second });
    }
    return res;
}
int main()
{
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    for (int i = 1; i <= n; i++) cin >> b[i];
    for (int i = 2; i <= n; i++)
    {
        cin >> c[i];
        c[i] += c[i - 1];
    }
    cin >> t;
    for (int i = 1; i <= n; i++) ans = max(ans, work(i, t - c[i]));
    cout << ans << endl;
    return 0;
}